<template>
    <div class="box-left-22" id="xcf22" style="width: 560px;height:250px;"></div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import * as echarts from 'echarts';

onMounted(() => {

    var chartDom = document.getElementById('xcf22');
    var myChart1 = echarts.init(chartDom);
    var option1;

    option1 = {
        tooltip: {
            trigger: 'axis'
        },
        legend: {
            data: ['Email', 'Union Ads']
        },
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name: 'Email',
                type: 'line',
                stack: 'Total',
                data: [120, 132, 101, 134, 90, 230, 210]
            },
            {
                name: 'Union Ads',
                type: 'line',
                stack: 'Total',
                data: [220, 182, 191, 234, 290, 330, 310]
            }
        ]
    };

    option1 && myChart1.setOption(option1);




})
</script>

<style lang="scss" scoped>
.box-left-22 {
    width: 48%;
    margin-left: 10px;
    background-color: #fff;
}
</style>